home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 3 / Amiga Format CD03 (1996-07-04)(Future Publishing)(GB)(Track 1 of 6)[!][issue 1996-08].iso / comms / awebsoftware / install < prev    next >
Text File  |  1996-05-20  |  15KB  |  394 lines

  1. ; $VER: Install_AWeb 1.0 (14.03.96)
  2. ; Description: Installer script for AWeb
  3.  
  4. (set cpu (database "cpu"))
  5. (set cpu020 (and (<> cpu "68000") (<> cpu "68010")))
  6. (set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39))
  7.  
  8. (set awn (getversion "AWeb"))
  9. (set awv (/ awn 65536))
  10. (set awr (- awn (* awv 65536)))
  11.  
  12. ; all strings used in this installer script
  13. (set #need39 "This program requires OS 3.0 or later to function.")
  14. (set #nohelp "No help available.")
  15. (set #welcome
  16.    (cat "AWeb is a fast, multithreaded World Wide Web browser for Amiga OS 3.0.\nAWeb doesn't use MUI.\nIt runs with a wide variety of TCP-stacks.\nAWeb can read your old AMosaic hotlists.\nIt has an ARexx and Shell command interface."
  17.       ("\n\nThis installation procedure will install the AWeb browser version %ld.%ld and the necessary ClassAct gadget classes on your system.\n" awv awr)
  18.       "It will not overwrite your existing preferences"
  19.    )
  20. )
  21. (set #destdir-prompt "Please select the directory where you want AWeb installed.\n(If you do not accept the default, a directory 'AWeb' will be created there.)")
  22. (set #destdir-help "A directory for AWeb will be created here. By accepting the default directory, most of the files don't have to be copied.")
  23. (set #installing "Installing ")
  24. (set #icons-prompt "Please select what icon you want to install")
  25. (set #icons-help "The archive is shipped with three different icons for the AWeb program.\nIcons for the standard Workbench, for Magic WB and for NewIcon are included.\n\nPlease select which of these icons you want to be installed.")
  26. (set #icons-message "You may have to edit the AWeb icon by hand afterwards. The little square in the unselected image should be red. Because you may have another Workbench palette installed than the default, the square may be in the wrong colour. You can use an icon editor to correct it.")
  27. (set #memory-prompt "Is your Amiga equipped with more than 2MB of memory?")
  28. (set #memory-help "AWeb runs perfectly on a 2MB Amiga, but needs a special setup on such a machine. If you click the 'only 2MB' button, the appropriate settings will be installed.\n\nYou can always change the settings after installation.")
  29. (set #fonts-prompt "Do you want to use small or large fonts for your browser window?\nSmall fonts are based on times.font/13,\nlarge fonts are based on times.font/15 with larger headings than the small font.")
  30. (set #fonts-help 
  31.    (cat "If you choose 'large fonts', settings will be installed that make AWeb look as closely to the standard NetScape setup as possible, using standard Workbench fonts.\n\n"
  32.       "Please note that the 'large fonts' settings need the CGTimes scalable font properly installed.\n\n"
  33.       "If you plan to run AWeb on a small screen (less than 640 x 400), you might want to select 'small fonts' to make the pages readable.\n\nYou can always change the settings after installation.")
  34.    )
  35.  
  36. (set #readme "Displaying the version notes readme...")
  37. (set #bye "In case you need help configuring or using AWeb, pressing the HELP key when AWeb is active will bring up the documentation.\nI hope you will enjoy using AWeb.\n\nIf you like AWeb, please consider to register it to support continued development.")
  38.  
  39. (set #contrib "In the 'Contrib' directory of the installation archive, you can find several utilities that could prove useful with Voodoo.\n\nNext you will have a chance to install some of these utilities.\n\nBefore deleting this directory after installation, please take a closer look at what else is available in the 'Contrib' dir.")
  40. (set #contrib-obtaingir "Would you like to install NewObtainGIRPort?\n\nThis small program patches the ObtainGIRPort() function of intuition.library to avoid deadlock situations in complex BOOPSI gadgets.")
  41. (set #obtaingir-startup "Adding NewObtainGIRPort to system startup files")
  42.  
  43. ; ---------------------------------------------------------------------------
  44.  
  45. ; ************* PLEASE COPY THIS PROCEDURE ALONG WITH THE STRINGS IT USES 
  46. ; ************* TO THE INSTALLER SCRIPT OF YOUR CLASSACT APPLICATION.
  47. ; ************* IT WILL TAKE CARE OF INSTALLING THE CLASSACT CLASSES YOU
  48. ; ************* PROVIDED WITH YOUR APPLICATION TO THE USER'S SYSTEM.
  49.  
  50. ; ClassAct installation procedure V 1.4 (23.12.95) by Osma Ahvenlampi
  51.  
  52. ; percentage of the size of included ClassAct classes versus the whole
  53. ; distribution (ie. total "complete" percentage after ClassAct is installed)
  54. (set classact-complete 50)
  55.  
  56. ; ClassAct installer scripts
  57. (set #classdest-prompt "Please select the directory where you want the ClassAct classes installed.\n(See help for details)")
  58. (set #classdest-help (cat "ClassAct is a GUI toolkit consisting of shared BOOPSI classes.\n\nThis player requires some of the ClassAct classes installed on your system. "
  59.     (if v39 (cat "OS 3.0 has a standard directory for BOOPSI classes, the SYS:Classes directory. It is recommended that you install ClassAct there.")
  60.             (cat "OS 2.0 does not have a standard place for disk resident BOOPSI classes. On OS 3.0 these classes are stored in the SYS:Classes directory. It is recommended that you create this directory and install ClassAct there.\nThis directory must be added in the LIBS: assign. This can be done by placing the command\nAssign >NIL: LIBS: SYS:Classes ADD\nto User-Startup. This installer will do this for you.")
  61.         )
  62.     )
  63. )
  64. (set #classes-020 "Do you want to use the OS 3.0, 020 optimised version of ClassAct?")
  65. (set #help-020 "Some ClassAct libraries have versions optimised for use on 020 or better equipped OS 3.0 or later machines. If your Amiga is such equipped, you should install these. The 68000/2.0 versions will also work, but are slightly slower.")
  66. (set #noclasses-message "The directory you selected for your ClassAct classes is not a part of the LIBS: assign.\n\nIt is necessary to add this assign so that the classes will be found properly.")
  67. (set #creating-dir "Creating directory ")
  68. (set #usbackup-prompt "User-Startup will now be backed up.")
  69. (set #usbackup-help "This installer will next make a modification in User-Startup. Before doing this the old User-Startup will be backed up to S:User-Startup.old")
  70. (set #adding-1 "Adding ")
  71. (set #adding-2 " to LIBS: assign\n")
  72. (set #adding-help "This is necessary so that the custom classes can be found.")
  73. (set #junod-button "It seems you have a late Commodore 'V42' button.gadget installed on your system.\n\nClassAct's button.gadget is far more capable than this gadget, and we recommend that you replace it. The ClassAct button.gadget is backwards compatible to the Commodore gadget. Do you wish to back up the Commodore gadget and replace it with the ClassAct version?")
  74. (set #junod-backed "The Commodore 'V42' button.gadget has been backed up with the name button.gadget.v42.\n\nThe ClassAct button.gadget will be installed in its place.")
  75. (set #junod-kept "The Commodore 'V42' button.gadget was not replaced with the more capable ClassAct version.\n\nPrograms depending on the availability of ClassAct-only features will be likely to work wrong.")
  76.  
  77. (procedure install-classact
  78. ; call this procedure to copy the classes included in the Classes directory
  79. ; in your distribution dir.
  80.     (if (exists "Classes") ; The archive contains a ClassAct library update.
  81.     (
  82.         (set comp-dest  (/ (* classact-complete 2) 10))
  83.         (set comp-libs  (/ (* classact-complete 3) 10))
  84.         (set comp-dirs  (/ (* classact-complete 4) 10))
  85.         (set comp-junod (/ (* classact-complete 5) 10))
  86.         (set comp-020   (/ (* classact-complete 6) 10))
  87.         (set comp-gad   (/ (* classact-complete 8) 10))
  88.         (set comp-im    (/ (* classact-complete 9) 10))
  89.     
  90.         ; has the user installed ClassAct in CLASSACT: ?
  91.         (set @classact-dest (getassign "CLASSACT" "A"))
  92.         (if (= @classact-dest "") (set @classact-dest "SYS:Classes"))
  93.         
  94.         ; is ClassAct already in SYS:Classes ?
  95.         (if (or (not (exists (tackon @classact-dest "Gadgets/layout.gadget") (noreq)))
  96.                 (= @user-level 2))
  97.             ; no, ask where it should be placed
  98.             (set @classact-dest
  99.                 (askdir
  100.                     (prompt #classdest-prompt)
  101.                     (help #classdest-help)
  102.                     (default @classact-dest)
  103.                     (newpath)
  104.                 )
  105.             )
  106.         )
  107.         
  108.         (complete comp-dest)
  109.         
  110.         (if (<> (run (cat "C/CheckAssign LIBS: " @classact-dest)) 0)
  111.             (
  112.                 (message #noclasses-message)
  113.                 (if (not (exists @classact-dest))
  114.                     (makedir @classact-dest (prompt (cat #creating-dir @classact-dest)))
  115.                 )
  116.                 (set @addassign (cat "Assign >NIL: LIBS: " @classact-dest " ADD\n"))
  117.                 (startup "CLASSACT"
  118.                     (command @addassign)
  119.                     (prompt (cat #adding-1 @classact-dest #adding-2))
  120.                     (help #adding-help)
  121.                 )
  122.                 (run (@addassign))
  123.             )
  124.         )
  125.         
  126.         (complete comp-libs)
  127.         
  128.         (set @classact-gadgets (tackon @classact-dest "Gadgets"))
  129.         (set @classact-images (tackon @classact-dest "Images"))
  130.         
  131.         (if (not (exists @classact-gadgets (noreq)))
  132.             (makedir @classact-images
  133.                 (prompt (cat #creating-dir @classact-gadgets))
  134.             )
  135.         )
  136.         
  137.         (if (not (exists @classact-images (noreq)))
  138.             (makedir @classact-images
  139.                 (prompt (cat #creating-dir @classact-images))
  140.             )
  141.         )
  142.         
  143.         (complete comp-dirs)
  144.         
  145.         (if (exists "SYS:Classes/Gadgets/button.gadget")
  146.             (if (< 40 (/ (getversion "SYS:Classes/Gadgets/button.gadget") 65536))
  147.                 (if (askbool (prompt #junod-button) (help @askbool-help) (default 1))
  148.                     (
  149.                         (rename "SYS:Classes/Gadgets/button.gadget" "SYS:Classes/Gadgets/button.gadget.v42")
  150.                         (message #junod-backed)
  151.                     )
  152.                     (message #junod-kept)
  153.                 )
  154.             )
  155.         )
  156.         
  157.         (complete comp-junod)
  158.         
  159.         (if (exists "Classes/Gadgets/layout.gadget.020")
  160.             (set classes-020 (askbool (prompt #classes-020) (help #help-020) (default (and cpu020 v39))))
  161.             (set classes-020 0)
  162.         )
  163.  
  164.         (complete comp-020)
  165.         
  166.         (foreach "Classes/Gadgets" "#?.gadget"
  167.             (
  168.                 (set thislib (tackon "Classes/Gadgets" @each-name))
  169.                 (if (and classes-020 (exists (cat thislib ".020")))
  170.                     (set thislib (cat thislib ".020"))
  171.                 )
  172.                 (copylib (source thislib)
  173.                     (dest @classact-gadgets)
  174.                     (newname @each-name)
  175.                     (prompt (cat #installing @each-name))
  176.                     (help #classdest-help)
  177.                     (optional "force" "askuser")
  178.                 )
  179.             )
  180.         )
  181.         
  182.         (complete comp-gad)
  183.         
  184.         (foreach "Classes/Images" "#?.image"
  185.             (
  186.                 (set thislib (tackon "Classes/Images" @each-name))
  187.                 (if (and classes-020 (exists (cat thislib ".020")))
  188.                     (set thislib (cat thislib ".020"))
  189.                 )
  190.                 (copylib (source thislib)
  191.                     (dest @classact-images)
  192.                     (newname @each-name)
  193.                     (prompt (cat #installing @each-name))
  194.                     (help #classdest-help)
  195.                     (optional "force" "askuser")
  196.                 )
  197.             )
  198.         )
  199.         
  200.         (complete comp-im)
  201.  
  202.         (foreach "Classes" "#?.class"
  203.             (
  204.                 (set thislib (tackon "Classes" @each-name))
  205.                 (if (and classes-020 (exists (cat thislib ".020")))
  206.                     (set thislib (cat thislib ".020"))
  207.                 )
  208.                 (copylib (source thislib)
  209.                     (dest @classact-dest)
  210.                     (newname @each-name)
  211.                     (prompt (cat #installing @each-name))
  212.                     (help #classdest-help)
  213.                     (optional "force" "askuser")
  214.                 )
  215.             )
  216.         )
  217.  
  218.         (complete classact-complete)
  219.     )
  220.     )
  221. )
  222.  
  223. ; ************** END OF CLASSACT INSTALL PROCEDURE. COPY THE BLOCK ABOVE
  224. ; ************** TO YOUR CLASSACT APPLICATION INSTALLER.
  225.  
  226. ; ---------------------------------------------------------------------------
  227.  
  228. (complete 0)
  229.  
  230. (if (not v39)
  231.    (abort #need39)
  232. )
  233.  
  234. (message #welcome)
  235.  
  236. (set @source-dir (pathonly @icon))
  237.  
  238. (set defdir
  239.    (askdir
  240.       (prompt #destdir-prompt)
  241.       (help #destdir-help)
  242.       (default @source-dir)
  243.    )
  244. )
  245. (set @default-dest defdir)
  246.  
  247. (set nocopy (= @source-dir @default-dest))
  248.  
  249. (install-classact)
  250.  
  251. (if (not nocopy)
  252.     (
  253.        (set @default-dest (tackon @default-dest "AWeb"))
  254.     
  255.        (set update-aweb (exists @default-dest))
  256.     
  257.        (if (not update-aweb)
  258.            (makedir @default-dest 
  259.                (prompt #creating-dir @default-dest) 
  260.                (infos)
  261.            )
  262.        )
  263.  
  264.       (copyfiles
  265.          (source "")
  266.          (dest @default-dest)
  267.          (choices "AWeb")
  268.          (prompt #installing "AWeb")
  269.       )
  270.  
  271.        (copyfiles
  272.          (source "")
  273.           (dest @default-dest)
  274.          (choices "Docs" "Icons" "Extras")
  275.           (prompt #installing "AWeb")
  276.           (infos)
  277.        )
  278.  
  279.     )
  280. )
  281.  
  282. (complete 70)
  283.  
  284. (if (or nocopy (not (exists (tackon @default-dest "AWeb.info"))))
  285.    (
  286.       (set #icontype
  287.          (askchoice
  288.             (prompt #icons-prompt)
  289.             (choices
  290.                "Standard"
  291.                "Magic WB"
  292.                "NewIcon"
  293.             )
  294.             (help #icons-help)
  295.          )
  296.       )
  297.  
  298.       (copyfiles
  299.          (source
  300.             (select #icontype
  301.                "Icons/AWeb.info"
  302.                "Icons/AWeb_MagicWB.info"
  303.                "Icons/AWeb_NewIcon.info"
  304.             )
  305.          )
  306.          (dest @default-dest)
  307.          (newname "AWeb.info")
  308.          (infos)
  309.       )
  310.  
  311.       (if (= #icontype 0)
  312.          (message #icons-message)
  313.       )
  314.    )
  315. )
  316.  
  317. (complete 80)
  318.  
  319. (if (not (exists (tackon @default-dest "AWeb.prefs")))
  320.    (if (exists "AWeb.prefs")
  321.       (copyfiles
  322.          (source "AWeb.prefs")
  323.          (dest @default-dest)
  324.       )
  325.       (  (set #memory
  326.             (askbool
  327.                (prompt #memory-prompt)
  328.                (help #memory-help)
  329.                (choices "More than 2MB" "Only 2MB")
  330.                (default 1)
  331.             )
  332.          )
  333.       
  334.          (set #fonts
  335.             (askbool
  336.                (prompt #fonts-prompt)
  337.                (help #fonts-help)
  338.                (choices "Large fonts" "Small fonts")
  339.                (default 0)
  340.             )
  341.          )
  342.       
  343.          (copyfiles
  344.             (source
  345.                (select (+ (* #memory 2) #fonts)
  346.                   "AWeb.prefs_2MB_small"
  347.                   "AWeb.prefs_2MB_large"
  348.                   "AWeb.prefs_small"
  349.                   "AWeb.prefs_large"
  350.                )
  351.             )
  352.             (dest @default-dest)
  353.             (newname "AWeb.prefs")
  354.          )
  355.       
  356.          (if (= #memory 0)
  357.             (makedir
  358.                (tackon @default-dest "T")
  359.             )
  360.          )
  361.       )
  362.    )
  363. )
  364.  
  365. (complete 90)
  366.  
  367. ;(if (= update-aweb 0)
  368. ;    (
  369. ;        (if (exists "Contrib")
  370. ;            (
  371. ;            
  372. ;            (message #contrib)
  373. ;            
  374. ;            (if (askbool (prompt #contrib-obtaingir)
  375. ;                    (help @askbool-help)
  376. ;                    (default 1)
  377. ;                )
  378. ;                (startup "NEWOBTAINGIRPORT"
  379. ;                    (command (cat "Run >NIL: " (tackon @default-dest "Contrib/NewObtainGIRPort/NewObtainGIRPort")))
  380. ;                    (prompt #obtaingir-startup)
  381. ;                    (help #nohelp)
  382. ;                )
  383. ;            )
  384. ;            )
  385. ;        )
  386. ;    )
  387. ;)
  388.  
  389. (complete 100)
  390.  
  391. (run "run >NIL: SYS:Utilities/MultiView README" (prompt #readme))
  392.  
  393. (exit #bye)
  394.